package com.yango.order.client;

import com.yango.order.client.impl.TeachClientImpl;
import com.yango.serviceutil.vo.CourseFrontVo;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author Li.Ding.yin
 * @create 2021年08月04日19:50-星期三
 * @role 远程调用接口
 */
@Component
@FeignClient(name = "service-teach", fallback = TeachClientImpl.class)
public interface TeachClient {

    //根据课程id获取课程信息-生成订单
    @ApiOperation(value = "根据课程id获取课程信息-生成订单")
    @GetMapping("/teach/front/course/getCourse/{courseId}")
    public CourseFrontVo getCourse(@ApiParam(name = "courseId", value = "课程id", required = true)
                                    @PathVariable("courseId") String courseId);
}
